function progress_bar(container){
	
	var bar = document.createElement('div');
	var text = document.createElement('div');

	bar.style.width = '0px';
	bar.style.height = '100%';
	bar.style.background = '#4FA9B8';

	container.appendChild(bar);

	text.style.marginTop = '-24px';
	text.style.textAlign = 'center';
	text.style.color = '#ffffff';
	text.style.textSize = '15px';

	text.appendChild(document.createTextNode('0%'));

	container.appendChild(text);

	//new function sets propertie for the progressbar
	this.set_percentage = function(percentage){
		bar.style.width = percentage + '%';

		//removes element
		text.removeChild(text.firstChild);
		text.appendChild(document.createTextNode(percentage + '%'));
	}

}